home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Problem Negating an Unsigned Char
- Date: 7 Mar 1996 01:16:48 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4hm9i0INNoio@keats.ugrad.cs.ubc.ca>
- References: <Dnnros.Lq.0.-s@hkusuc.hku.hk> <DnqMyr.4pF@cwi.nl> <4hfmmgINN4t8@anvil.ugrad.cs.ubc.ca> <TANMOY.96Mar4203146@qcd.lanl.gov>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <TANMOY.96Mar4203146@qcd.lanl.gov>,
- Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov> wrote:
- >In article <4hfmmgINN4t8@anvil.ugrad.cs.ubc.ca>
- >c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
- ><snip>
- >KK: Casting to an unsigned quantity is implementation defined.
- >
- >Incorrect. Casting to signed is indeed implementation defined: casting
- >to unsigned is perfectly well defined by the standard.
- >
- >In two's complement arithmetic, it involves no change in the
- >bitpattern. In others, the bit pattern may change.
- >
- >I know that you know this: it is just the statement that is misleading.
-
- Oops. What I should have said was that "depending on a cast to unsigned to do
- bit truncation involves an implementation-specific assumption", rather than
- saying that the operation itself is implementation defined.
- --
-
-